//删除管理员账号
exports.delete_master = function (req, res) {

    var bodyParams = req.routeInfo.bodyParams;
    //最终结果
    var resultData = {};

    //任务流创建
    async.waterfall([
        function (cb) {
            var mobile = bodyParams.mobile;
            if (mobile.toString().length < 6) {
                errCode = {
                    errcode: "4",
                    errMsg: "账户长度应大于六位"
                };
                return RES.response(res, false, errCode);
            }
            R.SEND_HTTP(
                req,
                {
                    url: CORE_APIConfig.coreAPI.updateUser,
                    method: 'POST',
                    data: {
                        u_username: bodyParams.mobile,
                        u_oid:0,
                        u_type:0
                    }
                },
                function (err, data) {
                    //判断是否有错误信息
                    resultData.updateData = data;

                    R.SEND_HTTP(
                        req,
                        {
                            url: CORE_APIConfig.coreAPI.deleteOrganizationUser,
                            method: 'POST',
                            data: {
                                ou_id: bodyParams.ou_id
                            }
                        },
                        function (err, data) {
                            //判断是否有错误信息
                            resultData.deleteData = data;

                            cb();
                        }
                    );
                }
            );
        }
        ], function (err, result) {

            //返回最终拼接结果
            RES.response(res, true, resultData);

        }
    );

}